﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NGE
{
    [Serializable]
    public class FileIndexer
    {
        string fullName;
        public FileIndexer()
        {
            fullName = "";
        }
        public FileIndexer(string fullname)
        {
            fullName = fullname;
        }
        public string FileName
        {
            get
            {
                return System.IO.Path.GetFileNameWithoutExtension(fullName);
            }
        }
        public string ExtName
        {
            get
            {
                return System.IO.Path.GetExtension(fullName);
            }
        }
        public string FullFileName
        {
            get
            {
                return FileName + ExtName;
            }
        }
        public string FolderName
        {
            get
            {
                string[] str = System.IO.Path.GetDirectoryName(fullName).Split(new string[] { "\\" }, StringSplitOptions.RemoveEmptyEntries);
                return str[str.Length - 1];
            }
        }
        public string PathName
        {
            get
            {
                string str = System.IO.Path.GetDirectoryName(fullName);
                if (str == string.Empty)
                {
                    return string.Empty;
                }
                return str + "\\";
            }
        }
        public string FullPathAndFileName
        {
            get
            {
                return fullName;
            }
        }
    }
}
